import request from '@/utils/request'
export default {
  saveCourseInfo(courseInfo) {
    return request({
      url: '/eduservice/course/saveCourceInfo',
      method: 'post',
      data: courseInfo
    })
  },
  getCourseInfoById(id) {
    return request({
      url: '/eduservice/course/getCourseInfoById/' + id,
      method: 'get'
    })
  },
  getPageList(page,limit,searchObj) {
    return request({
      url: `/eduservice/course/pageList/${page}/${limit}`,
      method: 'post',
      data: searchObj
    })
  },
  deleteCourseById(id) {
    return request(
      {
        url:'/eduservice/course/deleteCourse/'+id,
        method: 'delete'
      }
    )
  },
  getAllCourseInfo(id) {
    return request({
      url:'/eduservice/course/getAllCourseInfo/'+id,
      method: 'get'
    })
  },
  publshCourse(id){
    return request({
      url:'/eduservice/course/publshCourse/'+id,
      method: 'get'
    })
  }
}
